package cn.skyquant.quant4j.api.dict;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * 字典
 * Created by harley-dog on 2016/12/5.
 */
public class Dictionary {
    public String group;
    private Map<String,String> entry = Maps.newHashMap();
    public void put(String key,String value){
        entry.put(key,value);
    }
    public int size(){
        return entry.size();
    }
    public String get(String key){
        return entry.get(key);
    }
    public boolean contain(String key){
        return entry.containsKey(key);
    }

    @Override
    public String toString() {
        return "Dictionary{" +
                "group='" + group + '\'' +
                ", entry=" + entry +
                '}';
    }
}
